<?php
namespace Models;
class WxText extends BaseModel
{
    public function initialize()
    {
        $this->hasMany("token", "Wx", "token");
        $this->belongsTo("id", "WxKeyword", "pid");
    }

    public function notSave()
    {
        //Obtain the flash service from the DI container
        $flash = $this->getDI()->getFlash();

        //Show validation messages
        foreach ($this->getMessages() as $message) {
            $flash->error($message);
        }
    }
}